package org.fing.edu.uy.esbadp.core.entity;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

import org.fing.edu.uy.esbadp.core.constants.ConfigConstants;

@XmlRootElement(name = ConfigConstants.ADAPTATION_REQUIREMENTS_ROOT_ELEMENT)
@XmlSeeAlso({DMAdpAdaptationRequirement.class})
public class DMAdpAdaptationRequirements implements Serializable {

private static final long serialVersionUID = 1L;
	
	List<DMAdpAdaptationRequirement> requeriments;
	
	public DMAdpAdaptationRequirements(){
		this.requeriments = new LinkedList<DMAdpAdaptationRequirement>();		
	}

	@XmlElementRef
	public List<DMAdpAdaptationRequirement> getRequeriments() {
		return requeriments;
	}

	public void setRequeriments(List<DMAdpAdaptationRequirement> requeriments) {
		this.requeriments = requeriments;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Adaptation Requeriments ->\n");
		for(DMAdpAdaptationRequirement aux : requeriments){
			sb.append(aux.toString());
			sb.append("\n");
		}
		return sb.toString();
	}
	
}
